<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/15
 * Time: 9:03
 */
session_start();

function getLoginStatus(){

    //是否有token COOKIES值
    if(empty($_COOKIE['Token'])){
        return false;
    }
    $token = $_COOKIE['Token'];
    //判断是否SESSION中是否有对于的token项
    if(empty($_SESSION[$token])){
        return false;
    }
    return true;
}